//
//  SelfSizeText.m
//  15-HomeWork
//
//  Created by dllo on 16/8/3.
//  Copyright © 2016年 LST. All rights reserved.
//

#import "SelfSizeText.h"

@implementation SelfSizeText
+ (CGFloat)selfSizeWidthWithString:(NSString *)string height:(CGFloat)height font:(UIFont *)font {
    CGRect newRect = [string boundingRectWithSize:CGSizeMake(CGFLOAT_MAX, height) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName : font} context:nil];
    return newRect.size.width;
}

@end
